//
//  GLTopScrollBarView.h
//  GLLibDemo
//
//  Created by huang long on 2017/6/28.
//  Copyright © 2017年 历山大亚. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface GLScrollSegmentedBar : UIView

@property(nonatomic , weak)UIScrollView * contentView;

@property(nonatomic , strong)NSMutableArray * titleButtons;

- (instancetype)initWithArray:(NSArray *)titles;

/*
 * @huanggulong
 *
 * 动画完了之后的回调
 */
@property(nonatomic , copy)void(^didSelectedBlock)(NSInteger index);
/*
 * @huanggulong
 *
 * 动画之前的回调 
 * click 是否是点击产生的回调
 */
@property(nonatomic , copy)void(^didSelectedNewBlock)(NSInteger index,BOOL click);

/*
 * @huanggulong
 *
 * 数据源
 */
@property(nonatomic , strong)NSArray * titles;

/*
 * @huanggulong
 *
 * 当前所在的索引，动画完了重置索引
 */
@property(nonatomic , assign)NSInteger selectIndex;

//普通时的颜色
@property(nonatomic , strong)UIColor * normalColor;
//选中时的颜色
@property(nonatomic , strong)UIColor * selectColor;

@property(nonatomic , strong)UIFont * titleFont;

@property(nonatomic , strong,readonly)UIView * lineView;
/*
 * @huanggulong
 *
 * 每列的宽度
 * 这个colWidth 有值且大于0时 宽度是固定的(maxColWidth & minColWidth 将不起作用)
 */
@property(nonatomic , assign)CGFloat colWidth;

/*
 * @huanggulong
 *
 * 每列的最大宽度
 *
 */
@property(nonatomic , assign)CGFloat maxColWidth;

/*
 * @huanggulong
 *
 * 每列的最小宽度
 *
 */
@property(nonatomic , assign)CGFloat minColWidth;


/*
 * @huanggulong
 *
 * 红点
 *
 */
@property(nonatomic , strong)UIColor * badgeColor;

/*
 * @hgl
 *
 * hidden 隐藏
 * index  显示第几个
 */
- (void)setRedBadgeHidden:(BOOL)hidden withIndex:(NSInteger)index;

@end



@interface GLScrollAutoSegmentedBar:GLScrollSegmentedBar



@end
